<?xml version='1.0'?>

<gl_extension name="GLX_VERSION_1_3">
	<typedefs>
		<typedef type="XID" synonym="GLXWindow"/>
		<typedef type="XID" synonym="GLXPbuffer"/>
		<typedef type="XID" synonym="GLXFBConfigID"/>
		<typedef type="struct __GLXFBConfigRec*" synonym="GLXFBConfig"/>
		<typedef type="struct { int event_type; int draw_type; unsigned long serial; Bool send_event; Display* display; GLXDrawable drawable; unsigned int buffer_mask; unsigned int aux_buffer; int x, y; int width, height; int count; }" synonym="GLXPbufferClobberEvent"/>
	</typedefs>

	<tokens>
		<token name="GLX_WINDOW_BIT" value="0x00000001"/>
		<token name="GLX_PIXMAP_BIT" value="0x00000002"/>
		<token name="GLX_PBUFFER_BIT" value="0x00000004"/>
		<token name="GLX_RGBA_BIT" value="0x00000001"/>
		<token name="GLX_COLOR_INDEX_BIT" value="0x00000002"/>
		<token name="GLX_PBUFFER_CLOBBER_MASK" value="0x08000000"/>
		<token name="GLX_FRONT_LEFT_BUFFER_BIT" value="0x00000001"/>
		<token name="GLX_FRONT_RIGHT_BUFFER_BIT" value="0x00000002"/>
		<token name="GLX_BACK_LEFT_BUFFER_BIT" value="0x00000004"/>
		<token name="GLX_BACK_RIGHT_BUFFER_BIT" value="0x00000008"/>
		<token name="GLX_AUX_BUFFERS_BIT" value="0x00000010"/>
		<token name="GLX_DEPTH_BUFFER_BIT" value="0x00000020"/>
		<token name="GLX_STENCIL_BUFFER_BIT" value="0x00000040"/>
		<token name="GLX_ACCUM_BUFFER_BIT" value="0x00000080"/>
		<token name="GLX_CONFIG_CAVEAT" value="0x20"/>
		<token name="GLX_X_VISUAL_TYPE" value="0x22"/>
		<token name="GLX_TRANSPARENT_TYPE" value="0x23"/>
		<token name="GLX_TRANSPARENT_INDEX_VALUE" value="0x24"/>
		<token name="GLX_TRANSPARENT_RED_VALUE" value="0x25"/>
		<token name="GLX_TRANSPARENT_GREEN_VALUE" value="0x26"/>
		<token name="GLX_TRANSPARENT_BLUE_VALUE" value="0x27"/>
		<token name="GLX_TRANSPARENT_ALPHA_VALUE" value="0x28"/>
		<token name="GLX_DONT_CARE" value="0xFFFFFFFF"/>
		<token name="GLX_NONE" value="0x8000"/>
		<token name="GLX_SLOW_CONFIG" value="0x8001"/>
		<token name="GLX_TRUE_COLOR" value="0x8002"/>
		<token name="GLX_DIRECT_COLOR" value="0x8003"/>
		<token name="GLX_PSEUDO_COLOR" value="0x8004"/>
		<token name="GLX_STATIC_COLOR" value="0x8005"/>
		<token name="GLX_GRAY_SCALE" value="0x8006"/>
		<token name="GLX_STATIC_GRAY" value="0x8007"/>
		<token name="GLX_TRANSPARENT_RGB" value="0x8008"/>
		<token name="GLX_TRANSPARENT_INDEX" value="0x8009"/>
		<token name="GLX_VISUAL_ID" value="0x800B"/>
		<token name="GLX_SCREEN" value="0x800C"/>
		<token name="GLX_NON_CONFORMANT_CONFIG" value="0x800D"/>
		<token name="GLX_DRAWABLE_TYPE" value="0x8010"/>
		<token name="GLX_RENDER_TYPE" value="0x8011"/>
		<token name="GLX_X_RENDERABLE" value="0x8012"/>
		<token name="GLX_FBCONFIG_ID" value="0x8013"/>
		<token name="GLX_RGBA_TYPE" value="0x8014"/>
		<token name="GLX_COLOR_INDEX_TYPE" value="0x8015"/>
		<token name="GLX_MAX_PBUFFER_WIDTH" value="0x8016"/>
		<token name="GLX_MAX_PBUFFER_HEIGHT" value="0x8017"/>
		<token name="GLX_MAX_PBUFFER_PIXELS" value="0x8018"/>
		<token name="GLX_PRESERVED_CONTENTS" value="0x801B"/>
		<token name="GLX_LARGEST_PBUFFER" value="0x801C"/>
		<token name="GLX_WIDTH" value="0x801D"/>
		<token name="GLX_HEIGHT" value="0x801E"/>
		<token name="GLX_EVENT_MASK" value="0x801F"/>
		<token name="GLX_DAMAGED" value="0x8020"/>
		<token name="GLX_SAVED" value="0x8021"/>
		<token name="GLX_WINDOW" value="0x8022"/>
		<token name="GLX_PBUFFER" value="0x8023"/>
		<token name="GLX_PBUFFER_HEIGHT" value="0x8040"/>
		<token name="GLX_PBUFFER_WIDTH" value="0x8041"/>
	</tokens>

	<functions>
		<function name="glXGetFBConfigs" return="GLXFBConfig*">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="int" name="screen"/>
				<param type="int*" name="nelements"/>
			</params>
		</function>
		<function name="glXChooseFBConfig" return="GLXFBConfig*">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="int" name="screen"/>
				<param type="const int*" name="attrib_list"/>
				<param type="int*" name="nelements"/>
			</params>
			<mappings>
				<mapping from="GLX_SGIX_fbconfig" name="glXChooseFBConfigSGIX"/>
			</mappings>
		</function>
		<function name="glXGetFBConfigAttrib" return="int">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
				<param type="int" name="attribute"/>
				<param type="int*" name="value"/>
			</params>
			<mappings>
				<mapping from="GLX_SGIX_fbconfig" name="glXGetFBConfigAttribSGIX"/>
			</mappings>
		</function>
		<function name="glXGetVisualFromFBConfig" return="XVisualInfo*">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
			</params>
			<mappings>
				<mapping from="GLX_SGIX_fbconfig" name="glXGetVisualFromFBConfigSGIX"/>
			</mappings>
		</function>
		<function name="glXCreateWindow" return="GLXWindow">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
				<param type="Window" name="win"/>
				<param type="const int*" name="attrib_list"/>
			</params>
		</function>
		<function name="glXDestroyWindow" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXWindow" name="win"/>
			</params>
		</function>
		<function name="glXCreatePixmap" return="GLXPixmap">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
				<param type="Pixmap" name="pixmap"/>
				<param type="const int*" name="attrib_list"/>
			</params>
		</function>
		<function name="glXDestroyPixmap" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXPixmap" name="pixmap"/>
			</params>
		</function>
		<function name="glXCreatePbuffer" return="GLXPbuffer">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
				<param type="const int*" name="attrib_list"/>
			</params>
		</function>
		<function name="glXDestroyPbuffer" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXPbuffer" name="pbuf"/>
			</params>
		</function>
		<function name="glXQueryDrawable" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXDrawable" name="draw"/>
				<param type="int" name="attribute"/>
				<param type="unsigned int*" name="value"/>
			</params>
		</function>
		<function name="glXCreateNewContext" return="GLXContext">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXFBConfig" name="config"/>
				<param type="int" name="render_type"/>
				<param type="GLXContext" name="share_list"/>
				<param type="Bool" name="direct"/>
			</params>
		</function>
		<function name="glXMakeContextCurrent" return="Bool">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXDrawable" name="draw"/>
				<param type="GLXDrawable" name="read"/>
				<param type="GLXContext" name="ctx"/>
			</params>
		</function>
		<function name="glXGetCurrentReadDrawable" return="GLXDrawable"/>
		<function name="glXGetCurrentDisplay" return="Display*"/>
		<function name="glXQueryContext" return="int">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXContext" name="ctx"/>
				<param type="int" name="attribute"/>
				<param type="int*" name="value"/>
			</params>
		</function>
		<function name="glXSelectEvent" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXDrawable" name="draw"/>
				<param type="unsigned long" name="event_mask"/>
			</params>
			<mappings>
				<mapping from="GLX_SGIX_pbuffer" name="glXSelectEventSGIX"/>
			</mappings>
		</function>
		<function name="glXGetSelectedEvent" return="void">
			<params>
				<param type="Display*" name="dpy"/>
				<param type="GLXDrawable" name="draw"/>
				<param type="unsigned long*" name="event_mask"/>
			</params>
			<mappings>
				<mapping from="GLX_SGIX_pbuffer" name="glXGetSelectedEventSGIX"/>
			</mappings>
		</function>
	</functions>
</gl_extension>
